<?php
require_once 'Site/Filter/Magicquotes.php';
require_once 'Site/Filter/Username.php';

class Site_Filter extends Zend_Filter {
    static public function get($value, $filter, $args = array()) {
        switch ($filter) {
            case 'Magicquotes': return self::_magicquotes($value);
            case 'Username': return self::_username($value);
            default: return parent::get($value, $filter, $args);
        }
    }

    static protected function _magicquotes($value) {
        $filter = new Site_Filter_Magicquotes();
        return $filter->filter($value);
    }

    static protected function _username($value) {
        $filter = new Site_Filter_Username();
        return $filter->filter($value);
    }
}
?>
